<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>购物车列表</title>
	<script type='text/javascript' src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/gks/1113/shop';
WEB = 'http://localhost/gks/1113/shop/index.php';
URL = 'http://localhost/gks/1113/shop/index.php/Index/Cart/index';
APP = 'http://localhost/gks/1113/shop/HSHOP';
COMMON = 'http://localhost/gks/1113/shop/HSHOP/Common';
HDPHP = 'http://localhost/gks/1113/hdphp/hdphp';
HDPHPDATA = 'http://localhost/gks/1113/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/gks/1113/hdphp/hdphp/Extend';
MODULE = 'http://localhost/gks/1113/shop/index.php/Index';
CONTROLLER = 'http://localhost/gks/1113/shop/index.php/Index/Cart';
ACTION = 'http://localhost/gks/1113/shop/index.php/Index/Cart/index';
STATIC = 'http://localhost/gks/1113/shop/Static';
HDPHPTPL = 'http://localhost/gks/1113/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/gks/1113/shop/HSHOP/Index/View';
PUBLIC = 'http://localhost/gks/1113/shop/HSHOP/Index/View/Public';
CONTROLLERVIEW = 'http://localhost/gks/1113/shop/HSHOP/Index/View/Cart';
HISTORY = 'http://localhost/gks/1113/shop/';
</script>
	<link type="text/css" rel="stylesheet" href="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/css/index.css"/>
	<script type="text/javascript" src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/js/index.js"></script>
</head>
<body>
	<div id="top">
		<div class="logo">
			<a href="<?php echo U('Index/index');?>"><img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/img/logo.jpg" alt=""></a>
		</div>
		<ul class="middle">
			<li class="cur">1.我的购物车</li>
			<li>2.确认订单信息</li>
			<li>3.成功提交订单</li>
		</ul>
		<div class="right">
			<img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/../Index/img/tel.jpg" alt="" />
		</div>
	</div>
	<?php if($_SESSION['cart']['totalNum']){?>
	<div id="info">
		<div class="chk">
			<div class="tt">我的购物车</div>
			<?php if($_SESSION['user']['uid']){?>
			<?php  }else{ ?>
			<div class="info">
				现在 <a href="<?php echo U('Index/login');?>" class="btn">登录</a> ，您购物车中的商品将被永久保存
			</div>
			<?php }?>
		</div>
		<div class="title">尊敬的用户，珍品网承诺：所售商品100%正品，7天退换货。北京五环内用户提供6小时送达和时尚顾问亲自送货服务。祝您购物愉快！</div>
		<div class="hd-form">
			<table class="table2">
				<thead>
					<tr>
						<td class="w50"><input type="checkbox" checked="checked"/> 全选</td>
						<td class="w300">商品名称</td>
						<td class="w100" align="center">数量</td>
						<td>单价</td>
						<td>合计</td>
						<td>操作</td>
					</tr>
				</thead>
				<?php $hd["list"]["c"]["total"]=0;if(isset($_SESSION['cart']['goods']) && !empty($_SESSION['cart']['goods'])):$_id_c=0;$_index_c=0;$lastc=min(1000,count($_SESSION['cart']['goods']));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($_SESSION['cart']['goods'],0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

					<tr id="<?php echo $c['cart_id'];?>">
						<td><input type="checkbox" name="" checked="checked"/></td>
						<td  class="goods_name">
							<img src="http://localhost/gks/1113/shop/<?php echo $c['img'];?>" alt="">
							<a href="<?php echo U('Index/content',array('gid'=>$c['gid']));?>"><?php echo $c['goods_name'];?> <?php echo $c['attr_value'];?></a>
						</td>
						<td align="center">
							<span onclick='changePrice("<?php echo $c['cart_id'];?>",0);'>[-]</span>
							<input type="text" name='num' value='<?php echo $c['num'];?>' class="w30" style="text-align:center;" />
							<span onclick='changePrice("<?php echo $c['cart_id'];?>",1);'>[+]</span>
						</td>
						<td><i class="price">￥ <?php echo $c['price'];?></i></td>
						<td><i class="totalPrice">￥ <?php echo $c['totalPrice'];?></i></td>
						<td>
							<a href="javascript:;" onclick='delGoods("<?php echo $c['cart_id'];?>")'>删除</a>
						</td>
					</tr>
				<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
			</table>
		</div>
		<div class="count">
			<div class="right">
				<p class="one">
					<span id="totalNum"><?php echo $_SESSION['cart']['totalNum'];?></span> 件 商品 总计：
					<strong>￥<span id="totalPrice"><?php echo $_SESSION['cart']['totalPrice'];?></span></strong>
				</p>
			</div>
		</div>
		<div class="account">
			<strong>总计（免运费）：</strong> ￥ <span id="totalPrice2"><?php echo $_SESSION['cart']['totalPrice'];?></span>
		</div>
		<div class="last">
			<a href="http://localhost/gks/1113/shop" class="continue">继续购物</a>
			<a href="javascript:;" class="next" onclick="toOrder('<?php echo $_SESSION['user']['uid'];?>')">去结算></a>
		</div>
	</div>
		
	<?php  }else{ ?>
		
		<div id="null">
			<p class="one">您的购物袋还是空的，赶紧行动吧！ </p>
			<p class="two">马上去<a href="http://localhost/gks/1113/shop">挑选宝贝</a></p>
		</div>
		
	<?php }?>
	<!--未登录时触发登录注册层-->
	<div id="shade">
		<!--背景边框-->
		<div class="background"></div>
		<!--背景边框结束-->
	</div>
		<!--登录注册-->
	<div id="loginReg">
		<div class="title">
			<strong>您尚未登录</strong> <a href="javascript:;" class="close" onclick="loginClose()">X</a>
		</div>
		<div class="info">
			<div class="tab">
				<a href="javascript:;" class="loginBtn tabBtn cur" onclick="loginForm()">登录</a>
				<a href="javascript:;" class="regBtn tabBtn" onclick="regForm()">注册</a>
			</div>
			<form action="" method="post" id="loginForm" >
				<div class="con">
					<div class="line">
						<input type="text" name="username" placeholder="邮箱/手机号码/昵称" autocomplete="off"/>
					</div>
					<div class="line">
						<input type="password" name="password" placeholder="密码" autocomplete="off"/>
					</div>
					<div class="line" style="height: 17px;">
						<input type="hidden" name="remeberMe" value="0"/>
						<label class="chk"><input type="checkbox" name="remeberMe" value="1"/>记住我（下次自动登录）</label>
						<a href="" class="forget">忘记密码？</a>
					</div>
					<div class="line" style="margin-top: 10px;">
						<a href="javascript:;" onclick="userLogin()" class="button">登录</a>
					</div>
					<div class="go">
						<p>
							现在还不是奢品网用户？<a href="<?php echo U('Login/reg');?>">免费注册</a>
						</p>
					</div>
				</div>
				<div class="partner">
				<p>合作网站账户登录</p>
				<ul>
					<li>
						<a href="" title="QQ登录" class="qq"></a>
						<a href="" title="支付宝登陆" class="zhifubao"></a>
						<a href="" title="新浪微博" class="sina"></a>
					</li>
				</ul>
			</div>
			</form>	
			<form action="" method="post" id="regForm">
				<div class="con">
					<div class="line">
						<input type="text" name="username" placeholder="手机/邮箱" autocomplete="off"/>
					</div>
					<div class="line">
						<input type="password" name="password" placeholder="密码" autocomplete="off"/>
					</div>
					<div class="line">
						<input type="password" name="repassword" placeholder="确认密码" autocomplete="off"/>
					</div>
					<div class="chkCode line">
						<input type="text" name="code" placeholder="验证码" autocomplete="off"/>
						<a href="javascript:;" class="code" onclick="var oImg=document.getElementById('img');oImg.src='<?php echo U('code');?>&'+Math.random();">
							<img src="<?php echo U('code');?>" id="img"/>
							换一张
						</a>
					</div>
					<div class="line" style="height: 17px;">
						<label class="chk"><input type="checkbox" name="agree" value="1" id="agree" checked=""/>我已阅读并同意</label><u>奢品用户注册协议</u>
					</div>
					<div class="line" style="margin-top: 10px;">
						<a href="javascript:;" onclick="regUser()" class="button reg">注册</a>
					</div>
				</div>
			</form>
		</div>
	</div>
		<!--登录注册结束-->
	<!--登录注册触发层结束-->
	<div id="other">
		<div class="title"><a href="javascript:;"><?php if($_SESSION['cart']['totalNum']){?>购买此商品的人还购买了<?php  }else{ ?>推荐精品<?php }?></a></div>
		<ul>
			<li>
				<p><a href=""><img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/img/l1.jpg" alt="" /></a></p>
				<p>
					<a href=""><span class="brand">Swarovski</span>施华洛世奇 水晶自然色 钻石切割式 SOLITAIRE款耳饰 ZXH 1800046</a>
				</p>
				<p>
						￥418&nbsp;&nbsp;<del> ￥720</del>
				</p>
			</li>
			<li>
				<p><a href=""><img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/img/l1.jpg" alt="" /></a></p>
				<p>
					<a href=""><span class="brand">Swarovski</span>施华洛世奇 水晶自然色 钻石切割式 SOLITAIRE款耳饰 ZXH 1800046</a>
				</p>
				<p>
						￥418&nbsp;&nbsp;<del> ￥720</del>
				</p>
			</li>
			<li>
				<p><a href=""><img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/img/l1.jpg" alt="" /></a></p>
				<p>
					<a href=""><span class="brand">Swarovski</span>施华洛世奇 水晶自然色 钻石切割式 SOLITAIRE款耳饰 ZXH 1800046</a>
				</p>
				<p>
						￥418&nbsp;&nbsp;<del> ￥720</del>
				</p>
			</li>
			<li>
				<p><a href=""><img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/img/l1.jpg" alt="" /></a></p>
				<p>
					<a href=""><span class="brand">Swarovski</span>施华洛世奇 水晶自然色 钻石切割式 SOLITAIRE款耳饰 ZXH 1800046</a>
				</p>
				<p>
						￥418&nbsp;&nbsp;<del> ￥720</del>
				</p>
			</li>
			<li>
				<p><a href=""><img src="http://localhost/gks/1113/shop/HSHOP/Index/View/Cart/img/l1.jpg" alt="" /></a></p>
				<p>
					<a href=""><span class="brand">Swarovski</span>施华洛世奇 水晶自然色 钻石切割式 SOLITAIRE款耳饰 ZXH 1800046</a>
				</p>
				<p>
						￥418&nbsp;&nbsp;<del> ￥720</del>
				</p>
			</li>
		</ul>
	</div>
	<div id="bottom">
		<p>Copyright © 2011-2014 珍品网-中国领先的奢侈品购物网站 | 世界顶级奢侈品品牌网购网站</p>
	</div>
</body>
</html>